package com.kaoker.system.entity;

import java.util.HashSet;
import java.util.Set;

/**
 * 每一道真题: 
 * 
 * @author bladestone
 *
 */
public class Exercise implements java.io.Serializable {
	private static final long serialVersionUID = -938404625536246534L;

	private Long id;
    
    private int orderNumber;
    //题目要求说明
    private String statement;
    //选择题目的选项，以<p></p>分割
    private String examOptions;
    
    private ExerciseType exerciseType;
    private ExamPaper examPaper;
    
    private Set<KeyNotePoint> referKeyNotesPoints = new HashSet();
    private Set<ExamPoint> referExamPoints = new HashSet();
    private Set<Exercise> referExercises = new HashSet();
    
    public Exercise() {
    	
    }

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public int getOrderNumber() {
		return orderNumber;
	}

	public void setOrderNumber(int orderNumber) {
		this.orderNumber = orderNumber;
	}

	public ExerciseType getExerciseType() {
		return exerciseType;
	}

	public void setExerciseType(ExerciseType exerciseType) {
		this.exerciseType = exerciseType;
	}

	public ExamPaper getExamPaper() {
		return examPaper;
	}

	public void setExamPaper(ExamPaper examPaper) {
		this.examPaper = examPaper;
	}

	public Set<KeyNotePoint> getReferKeyNotesPoints() {
		return referKeyNotesPoints;
	}

	public void setReferKeyNotesPoints(Set<KeyNotePoint> referKeyNotesPoints) {
		this.referKeyNotesPoints = referKeyNotesPoints;
	}

	public Set<ExamPoint> getReferExamPoints() {
		return referExamPoints;
	}

	public void setReferExamPoints(Set<ExamPoint> referExamPoints) {
		this.referExamPoints = referExamPoints;
	}

	public Set<Exercise> getReferExercises() {
		return referExercises;
	}

	public void setReferExercises(Set<Exercise> referExercises) {
		this.referExercises = referExercises;
	}

	public String getStatement() {
		return statement;
	}

	public void setStatement(String statement) {
		this.statement = statement;
	}

	public String getExamOptions() {
		return examOptions;
	}

	public void setExamOptions(String examOptions) {
		this.examOptions = examOptions;
	}
    
	public void addRefKeyNotePoint(KeyNotePoint keyNotePoint) {
		this.referKeyNotesPoints.add(keyNotePoint);
		//keyNotePoint.getReferExercises().add(this);
	}
	
	public void addRefExercise(Exercise refExercise) {
		this.referExercises.add(refExercise);
		//refExercise.getReferExercises().add(this);
	}
	
	public void addRefExamPoint(ExamPoint examPoint) {
		this.referExamPoints.add(examPoint);
		examPoint.getReferExercises().add(this);
	}	
}
